#pragma once

// 需要获取一些依赖，可以定义在头文件：
//
// TimeType  用来定义时间的数据类型，例如 using TimeType = typename TimeSource::TimeType;
//
// TimeCycle 简单的非阻塞延时工具，例如 using TimeCycle = scheduler_basic::TimeCycle<TimeSource>;
//
// 依赖的全局变量：
//
// extern U8G2 u8g2;
//
#if __has_include("between_face_requirement.hpp")
    #include "between_face_requirement.hpp"
#elif __has_include("app.hpp")
    #include "app.hpp"
#else
    #error "A header file is required"
#endif


namespace beef {

    static_assert(sizeof(TimeType) > 1, "A proper TimeType is required");
    static_assert(sizeof(TimeCycle) > 1, "A proper TimeCycle is required");
}  // namespace beef


// option 是可选项，未定义时提供了默认值
// requirement 是必要的，没有默认值
#if __has_include("between_face_option.hpp")
    #include "between_face_option.hpp"
#else

namespace beef {

    #ifdef BETWEEN_FACE__MENU_EDIT_MAX_DIGIT
    constexpr uint8_t MENU_EDIT_MAX_DIGIT = BETWEEN_FACE__MENU_EDIT_MAX_DIGIT;
    #else
    constexpr uint8_t MENU_EDIT_MAX_DIGIT = 8;
    #endif

    #ifdef BETWEEN_FACE__MENU_EDIT_MAX_PRECISION
    constexpr uint8_t MENU_EDIT_MAX_PRECISION = BETWEEN_FACE__MENU_EDIT_MAX_PRECISION;
    #else
    constexpr uint8_t MENU_EDIT_MAX_PRECISION = 3;
    #endif

#endif

}  // namespace between_face
